#include <my_head.h>
void print_arr(int *p,int len){
    for(int i = 0;i<len;i++){
        printf("%d ",p[i]);
    }
    printf("\n");
}

int one_sort(int *p,int low,int high){
    int flag = p[low];
    while(low<high){
        while(p[high]>flag && low<high){
            high--;
        }
        if(low<high){
            p[low] = p[high];
            low++;
        }
        while(p[low]<flag && low<high){
            low++;
        }
        if(low<high){
            p[high] = p[low];
            high--;
        }
    }
    p[low] = flag;
    return low;
}

int quick_sort(int *p,int low,int high){
    if(low < high){
        int ret = one_sort(p,low,high);
        quick_sort(p,low,ret-1);
        quick_sort(p,ret+1,high);
    }
}


int main(int argc, const char *argv[]){
    int s[10] = {2,3,6,1,8,34,22,12,23,88};
    print_arr(s,10);
    quick_sort(s,0,9);
    print_arr(s,10);
    return 0;
}